<?php

session_start();

/**
* Prevent a Cross Site Request Forgery (CSRF)
*/

if(!isset($_SESSION['token'])){
	$_SESSION['token'] = sha1(time());
}

/**
* Require Secured Data
*/
include_once "../private/config/secure.inc.php";

/**
* Connection Object
*/

$conString = "mysql:host=" . DB_HOST . ";dbname=" . DB_NAME;
$dbo = new PDO($conString, DB_USR, DB_PWD);

/**
* Autoload function that would be required from all the files that use this core
* and follow the naming convetion
*/
function __autoload($class)
{
    $fs = strtolower("../private/classes/class." . $class . ".inc.php");
    if ( file_exists($fs) )
    {
        include_once $fs;
    }
}

?>